#ifndef IRENDERABLE_H_INCLUDED
#define IRENDERABLE_H_INCLUDED

#include "sDataHandle.h"

enum eRENDERABLETYPES {
	RENDERABLE_GEOMETRY = 0,
	RENDERABLE_LIGHT
};

class CDataManager;

/// This is simply... an object that can be drawn on screen.
/**	It contains data like vertex buffer, index buffer and an effect.
		However it integrates type variable that can be used to ovverride classical renderables, and give support to... lights for example. */
class IRenderable {
protected:
	CDataManager* m_pDataRepo;	///< Data repository reference. If NULL, you are responsible for the delition of this renderable
	DATAH			  m_DataHandle;///< Data handle for this renderable

	DATAH m_Geometry;				///< Vertex buffer handle
	DATAH m_Indices;				///< Index buffer handle
	DATAH m_Effect;				///< Effect handle

	uint  m_RenderableType;		///< Renderable type

private:

public:
	// Public gets
	virtual DATAH GetGeometry		( ) const { return m_Geometry; }
	virtual DATAH GetIndices 		( ) const { return m_Indices;  }
	virtual DATAH GetEffect  		( ) const { return m_Effect;   }
	virtual CDataManager* GetRepository( ) const { return m_pDataRepo; }
	virtual uint  GetType			( ) const { return m_RenderableType; }

			   // Constructor & Destructor
			   IRenderable( CDataManager* repo, DATAH geometry, DATAH indices, DATAH effect, uint type = RENDERABLE_GEOMETRY );
			   IRenderable( CDataManager* repo, uint type = RENDERABLE_GEOMETRY );
			   IRenderable( uint type = RENDERABLE_GEOMETRY );
	virtual ~IRenderable(  );
};


#endif // IRENDERABLE_H_INCLUDED
